{extend name="../../admin/view/main"}

{block name="button"}
{/block}

{block name="content"}
<div class="layui-tab layui-tab-card">

    <div class="layui-tab-content">
        {include file='report/customer/index_search'}
        <table class="layui-table margin-top-10" lay-skin="line">
            {notempty name='list'}
            <thead>
            <tr>
                <th class='nowrap'>ID</th>
                <th class='nowrap'>城市</th>
                <th class='nowrap'>区域</th>
                <th class='nowrap'>姓名</th>
                <th class='nowrap'>车型</th>

                <th class='nowrap'>车型</th>
                <th class='nowrap'>城市</th>
                <th class='nowrap'>姓名</th>
                <th class='nowrap'>注册号码</th>
                <th class='nowrap'>车牌号</th>
                <th class='nowrap'>喷漆类型</th>
                <th class='nowrap'>尾部喷漆</th>
                <th class='nowrap'>是否覆盖</th>
                <th class='nowrap'>是否返工</th>
                <th class='nowrap'>覆盖几面</th>
                <th class='nowrap'>喷漆日期</th>
                <th class='nowrap'>供应商名称</th>
                <!--{if session('user.username') eq 'LiuLiang'}-->
                <th class='nowrap'>单价</th>
                <th class='nowrap'>覆盖面费用</th>
                <th class='nowrap'>总额</th>
                <!--{/if}-->
            </tr>
            </thead>
            {/notempty}
            <tbody>
            {foreach $list as $key=>$vo}
            <tr data-dbclick>
                <td class='nowrap'>
                    <div><span class="color-text">{$vo.id|default='-'}</span></div>
                </td>
                <td class="nowrap"><!--城市--><div>{$vo.city}</div></td>
                <td class="nowrap"><!--区域--><div>{$vo.area}</div></td>
                <td class="nowrap"><!--姓名--><div>{$vo.username}</div></td>
                <td class="nowrap"><!--车型--><div>{$vo.car_vehicle_type}</div></td>

                <td class="nowrap"><!--车型--><div>{$vo.car_vehicle_type}</div></td>
                <td class="nowrap"><!--城市--><div>{$vo.province_owner}{$vo.city_owner}</div></td>
                <td class="nowrap"><!--司机--><div>{$vo.username}</div></td>
                <td class="nowrap"><!--电话--><div>{$vo.phone}</div></td>
                <td class="nowrap"><!--车牌--><div>{$vo.plate_number}</div></td>
                <td class="nowrap"><!--喷漆类型--><div>{$vo.paint_type}</div></td>
                <td class="nowrap"><!--尾部喷漆--><div>{if $vo.end_paint_status eq 0}<span class="color-red">否</span>{elseif $vo.end_paint_status eq 1}<span class="color-green">是</span>{else}{/if}</div></td>
                <td class="nowrap"><!--是否覆盖--><div>{if $vo.has_cover eq 0}<span class="color-red">否</span>{elseif $vo.has_cover eq 1}<span class="color-green">是</span>{else}{/if}</div></td>
                <td class="nowrap"><!--是否返工--><div>{if $vo.is_rework eq 0}<span class="color-red">否</span>{elseif $vo.has_cover eq 1}<span class="color-green">是</span>{else}{/if}</div></td>
                <td class="nowrap"><!--覆盖几面--><div>{$vo.cover_num}</div></td>
                <td class="nowrap"><!--喷漆日期--><div>{$vo.time_complete}</div></td>
                <td class="nowrap"><!--供应商名称--><div>{$vo.company}</div></td>
                <!--{if session('user.username') eq 'LiuLiang'}-->
                <td class="nowrap"><!--喷漆费用-单价--><div>{$vo.platform_price}</div></td>
                <td class="nowrap"><!--覆盖面费用--><div>{$vo.cover_price}</div></td>
                <td class="nowrap"><!--总额--><div>{$vo.platform_price + $vo.cover_price}</div></td>
                <!--{/if}-->
                <td class="nowrap" forward>

                    <!--{if auth("edit")}-->
                    <a data-dbclick class="layui-btn layui-btn-sm layui-btn-primary" data-modal="{:url('edit')}?id={$vo.id}" data-width="900px">编 辑</a>
                    <!--{/if}-->

                </td>
            </tr>
            {/foreach}
            </tbody>
        </table>
        {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
    </div>
</div>

<script>
    $('[forward]').on('click', '[data-rule-page]', function () {
        var $that = $(this);
        $that = $(this), top.setItemValue = function (value) {
            var data_id = $that.data('id');
            $.form.load("{:url('forward')}", {data: value, id: data_id}, 'post');
        };
        $.form.iframe($(this).data('rule-page'), $that.data('title') || $that.text(), ['930px', '600px']);
    })
</script>

{/block}